package com.kingdee.pda.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author：dlj
 * @data：2021/9/9 10:40
 * @des：仓库的库区库位信息
 */
public class WarehouseAreaLocationInfo implements Serializable {

    /**
     * 仓库编码
     */
    private Long warehouseId;
    /**
     * 仓库编码
     */
    private String warehouseCode;
    /**
     * 仓库名称
     */
    private String warehouseName;

    /**
     * 库区
     */
    private List<AreaInfo> areaList;

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public String getWarehouseCode() {
        return warehouseCode == null ? "" : warehouseCode;
    }

    public void setWarehouseCode(String warehouseCode) {
        this.warehouseCode = warehouseCode;
    }

    public String getWarehouseName() {
        return warehouseName == null ? "" : warehouseName;
    }

    public void setWarehouseName(String warehouseName) {
        this.warehouseName = warehouseName;
    }

    public List<AreaInfo> getAreaList() {
        if (areaList == null) {
            return new ArrayList<>();
        }
        return areaList;
    }

    public void setAreaList(List<AreaInfo> areaList) {
        this.areaList = areaList;
    }

    public class AreaInfo implements Serializable {
        /**
         * 库区编码
         */
        private String areaId;
        /**
         * 库区编码
         */
        private String areaCode;
        /**
         * 库区名称
         */
        private String areaName;
        /**
         * 库区类型 收货区 1
         */
        private int areaType;
        /**
         * 是否默认库区
         */
        private boolean defaultArea;

        /**
         * 库位
         */
        private List<LocationInfo> locationList;

        public String getAreaId() {
            return areaId == null ? "" : areaId;
        }

        public void setAreaId(String areaId) {
            this.areaId = areaId;
        }

        public String getAreaCode() {
            return areaCode == null ? "" : areaCode;
        }

        public void setAreaCode(String areaCode) {
            this.areaCode = areaCode;
        }

        public String getAreaName() {
            return areaName == null ? "" : areaName;
        }

        public void setAreaName(String areaName) {
            this.areaName = areaName;
        }

        public int getAreaType() {
            return areaType;
        }

        public void setAreaType(int areaType) {
            this.areaType = areaType;
        }

        public boolean getDefaultArea() {
            return defaultArea;
        }

        public void setDefaultArea(boolean defaultArea) {
            this.defaultArea = defaultArea;
        }

        public List<LocationInfo> getLocationList() {
            if (locationList == null) {
                return new ArrayList<>();
            }
            return locationList;
        }

        public void setLocationList(List<LocationInfo> locationList) {
            this.locationList = locationList;
        }

        public class LocationInfo implements Serializable {
            /**
             * 库位id
             */
            private long locationId;
            /**
             * 库位编码
             */
            private String locationCode;
            /**
             * 库位名称
             */
            private String locationName;

            /**
             * 是否默认库位
             */
            private boolean defaultLocation;

            public long getLocationId() {
                return locationId;
            }

            public void setLocationId(long locationId) {
                this.locationId = locationId;
            }

            public String getLocationCode() {
                return locationCode == null ? "" : locationCode;
            }

            public void setLocationCode(String locationCode) {
                this.locationCode = locationCode;
            }

            public String getLocationName() {
                return locationName == null ? "" : locationName;
            }

            public void setLocationName(String locationName) {
                this.locationName = locationName;
            }

            public boolean getDefaultLocation() {
                return defaultLocation;
            }

            public void setDefaultLocation(boolean defaultLocation) {
                this.defaultLocation = defaultLocation;
            }
        }
    }
}